1. Field of the Invention
The present invention relates to a program tamper detecting apparatus, a method for program tamper detection, and a program for program tamper detection for preventing tampering with a computer program.
2. Description of the Related Art
In recent years, with rapid advances in computer technology, a wide variety of products mount computers. Such computers require a CPU (central processing unit) and computer programs for running the CPU. The computer program mounted in a product, such as a home electrical appliance or a communication apparatus, is designed based on specifications unique to that product. For example, a receiver for use in a pay broadcasting system is preferably usable only to an individual person having an agreed-upon reception contract. Accordingly, also the computer program to be mounted in the receiver is designed to be operable only in the event that the receiver is properly or legally used. The computer program for activating such a receiver is stored in a ROM (read-only memory) and is read in the event of activation of the receiver. The computer controls the receiver by execution of the read computer program.
In the field of apparatuses which performs electronic control by using a computer, similar to the case of a main body of the apparatus, it costs very much for developing of a computer program that is to be stored in the ROM in the apparatus. Such computer programs are important properties of businesses. For example, as for the above-described pay broadcasting system, suppose that a program for activating a receiver for receiving a pay-broadcast is known to a third party not having an agreed-upon reception contract. This implies that services provided by the pay broadcasting system may probably be used by the illegal third party. In addition, the computer program is an intellectual property with respect to the system. In order to protect appropriately the computer program, which is the intellectual property, there is a demand of techniques for preventing a third party from knowing the computer program easily.
Conventionally, specifications of a general-purpose CPU and ROM are widely open to the general public. Under these circumstances, a third party obtaining an apparatus, which includes a computer with the CPU and the ROM, can easily perform program analysis. In this connection, there are techniques known that prevent the third party from performing the program analysis of the computer program stored in the ROM in an apparatus.
The examples of these techniques are shown in the following related art.
Japanese Laid Open Patent Application (JP-Heisei 11-126174 A) discloses a memory data of a microprocessor reading apparatus. The memory data of a microprocessor reading apparatus includes a microprocessor, a memory means and a reading means. The memory means memorizes information data for operating the microprocessor. The reading means reads out the information data in the memory means and sends the information data to the microprocessor. The reading means has a data transforming circuit. The data transforming circuit transforms the information data read out from the memory means by a data dynamically changed during the reading out the information data.
Japanese Laid Open Patent Application (JP-Heisei 08-305558 A) discloses an encrypted program operating apparatus. The encrypted program operating apparatus includes a first memory, a second memory and a read protection means. The first memory stores at least a decryption program. The second memory stores an encrypted-program which is decrypted by the decryption program stored in the first memory. The read protection means protects the decrypted encrypted-program stored in the second memory from reading out the outside.
Japanese Laid Open Patent Application (JP-Heisei 05-197633 A) discloses an integrated circuit. The integrated circuit includes a CPU, a decrypting means and a key code storing means. The CPU executes data processing. The decrypting means decrypts encrypted instruction codes into codes by which the CPU can executes data processing. The key code storing means stores key codes for controlling the data decrypted by the decrypting means.
Japanese Laid Open Patent Application (JP-Showa 59-188897 A) discloses a data security protection device for a data processing apparatus. The data security protection device includes a LSI for data processing with an internal memory and a logic circuit. The internal memory can not allow the outside device to read out its data. The logic circuit performs a proper logical operation between the data read out from an external memory outside of the LSI and the data read out from the internal memory. The internal memory stores a plurality of keyword codes. The external memory stores transformed codes, which are already transformed such that regular data can be obtained by the proper logical operation between the keyword codes and the transformed codes. The data security protection device generates the regular data by reading out addresses from the internal memory and the external memory.
In addition, with advances in semiconductor technology, nonvolatile and programmable/reprogrammable ROMs (such as flash ROMs) have been available, and are widely used for above-mentioned apparatuses. Using these ROMs, it becomes very easy to update a version of the computer program for operating the apparatus. For the apparatuses using such a programmable/reprogrammable ROM (“reprogrammable ROM”, hereafter), techniques are demanded which can prevents the illegal reprogramming of a computer program stored in the ROM.
FIG. 1 is a block diagram showing a conventional configuration having the CPU and the ROM (“flash ROM”, hereafter). Referring to FIG. 1, a conventional apparatus has a flash ROM 101 and a CPU 102 connected with each other through a bus 103. Further, the flash ROM 101 has a normal area 101a and a one-time program area 101b. 
The normal area 101a is an area in which data programmed therein can be reprogrammed, and stores encrypted computer programs. The one-time program area 101b is a non-reprogrammable (only one-time programmable) area. The one-time program area 101b stores a decryption program for decrypting the encrypted programs. The one-time program area 101b stores an activation program for activating the apparatus.
In the activation, the CPU 102 first reads the activation program from the one-time program area 101b, and starts the activation of the apparatus. The decryption program decrypts an encrypted program stored in the normal area 101a of the flash ROM 101, and concurrently loads the decrypted program into an external RAM (not shown). Thereafter, the loaded program drives the apparatus to operate.
The conventional techniques can prevent the third party from using the apparatus illegally. The techniques are excellent in terms of the prevention of illegal analysis of computer programs. However, further robust program analysis prevention techniques are demanded. Additionally techniques are demanded for preventing tampering with programs. Further techniques are demanded for detecting tampering with a computer program and outputting warning when the computer program is tampered with.